package com.dianping.cat.consumer.dependency.model.entity;

import com.dianping.cat.consumer.dependency.model.BaseEntity;
import com.dianping.cat.consumer.dependency.model.IVisitor;










public class Dependency
  extends BaseEntity<Dependency>
{
  private String m_type;
  private String m_target;
  private long m_totalCount;
  private double m_avg;
  private long m_errorCount;
  private String m_key;
  private double m_sum;

  public Dependency() {}

/*  28 */   public Dependency(String key) { this.m_key = key; }




/*  33 */   public void accept(IVisitor visitor) { visitor.visitDependency(this); }



  public boolean equals(Object obj) {
/*  38 */     if (obj instanceof Dependency) {
/*  39 */       Dependency _o = (Dependency)obj;

/*  41 */       if (!equals(getKey(), _o.getKey())) {
/*  42 */         return false;
      }

/*  45 */       return true;
    }

/*  48 */     return false;
  }


/*  52 */   public double getAvg() { return this.m_avg; }



/*  56 */   public long getErrorCount() { return this.m_errorCount; }



/*  60 */   public String getKey() { return this.m_key; }



/*  64 */   public double getSum() { return this.m_sum; }



/*  68 */   public String getTarget() { return this.m_target; }



/*  72 */   public long getTotalCount() { return this.m_totalCount; }



/*  76 */   public String getType() { return this.m_type; }




  public Dependency incErrorCount() {
/*  89 */     this.m_errorCount++;
/*  90 */     return this;
  }

  public Dependency incErrorCount(long errorCount) {
/*  94 */     this.m_errorCount += errorCount;
/*  95 */     return this;
  }

  public Dependency incTotalCount() {
/*  99 */     this.m_totalCount++;
/* 100 */     return this;
  }

  public Dependency incTotalCount(long totalCount) {
/* 104 */     this.m_totalCount += totalCount;
/* 105 */     return this;
  }


  public void mergeAttributes(Dependency other) {
/* 110 */     assertAttributeEquals(other, "dependency", "key", this.m_key, other.getKey());

/* 112 */     if (other.getType() != null) {
/* 113 */       this.m_type = other.getType();
    }

/* 116 */     if (other.getTarget() != null) {
/* 117 */       this.m_target = other.getTarget();
    }

/* 120 */     this.m_totalCount = other.getTotalCount();

/* 122 */     this.m_avg = other.getAvg();

/* 124 */     this.m_errorCount = other.getErrorCount();

/* 126 */     this.m_sum = other.getSum();
  }

  public Dependency setAvg(double avg) {
/* 130 */     this.m_avg = avg;
/* 131 */     return this;
  }

  public Dependency setErrorCount(long errorCount) {
/* 135 */     this.m_errorCount = errorCount;
/* 136 */     return this;
  }

  public Dependency setKey(String key) {
/* 140 */     this.m_key = key;
/* 141 */     return this;
  }

  public Dependency setSum(double sum) {
/* 145 */     this.m_sum = sum;
/* 146 */     return this;
  }

  public Dependency setTarget(String target) {
/* 150 */     this.m_target = target;
/* 151 */     return this;
  }

  public Dependency setTotalCount(long totalCount) {
/* 155 */     this.m_totalCount = totalCount;
/* 156 */     return this;
  }

  public Dependency setType(String type) {
/* 160 */     this.m_type = type;
/* 161 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-consumer-3.0.0.jar!/com/dianping/cat/consumer/dependency/model/entity/Dependency.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */